using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace OBUCare.Core.Models
{
    public partial class REPAIR_ORDERS
    {
        public REPAIR_ORDERS()
        {
            this.REPAIR_ORDER_ADJUST = new List<REPAIR_ORDER_ADJUST>();
            this.REPAIR_ORDER_FAULT = new List<REPAIR_ORDER_FAULT>();
        }

        public long ID { get; set; }
        public string REPAIR_ORDER_NO { get; set; }
        [StringLength(16)]
        public string OBU_NO { get; set; }
        [Required(ErrorMessage = "请输入客户编号")]
        public string USER_NO { get; set; }
        public string OWNER_NAME { get; set; }
        [Required(ErrorMessage = "请输入送修人")]
        [Display(Name = "送修人")]
        public string REPORTER { get; set; }
        [Display(Name = "固定电话")]
        public string TEL_NO { get; set; }
        [Required(ErrorMessage = "请输入手机号码")]
        [RegularExpression(@"^\d+$", ErrorMessage = "输入不正确")]
        [Display(Name = "接收短信手机号码")]
        public string MOBILE_TEL_NO { get; set; }

        [Required(ErrorMessage = "请输入接受维修费用")]
        [RegularExpression(@"^\d+$|^\d+\.\d{2}$", ErrorMessage = "请输入数字，如：100或者100.00")]
        [Range(0.0, 123456.0, ErrorMessage = "超过最大范围，请重新填写")]
        [Display(Name = "接受维修费用")]
        public Nullable<decimal> MAX_PRICE { get; set; }
        public string AGENT_NO { get; set; }
        public string CLIENT_IP { get; set; }
        [Required]
        [Display(Name = "外观检测")]
        public bool FACE_STATUS { get; set; }
        [Display(Name = "维修类型")]
        public int REPAIR_TYPE { get; set; }
        public string REPAIRED_COMMENT { get; set; }
        public Nullable<bool> IS_FREE { get; set; }
        [RegularExpression(@"^\d{16}$", ErrorMessage = "备用标签号必须是16位")]
        [Display(Name = "备用标签号")]
        public string SPARE_OBU_NO { get; set; }
        [Display(Name = "备用标签押金")]
        [RegularExpression(@"^\d+$|^\d+\.\d{2}$", ErrorMessage = "请输入数字，如：100或者100.00")]
        public Nullable<decimal> SPARE_OBU_PRICE { get; set; }
        [RegularExpression(@"^\d{4}[-/.]\d{1,2}[-/.]\d{1,2}$|^\d{4}[-/.]\d{1,2}[-/.]\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}$", ErrorMessage = "请输入正确格式的安装日期,年月日用'-'分割。如：2013-3-12")]
        [Display(Name = "备用标签安装日期")]
        public Nullable<System.DateTime> SPARE_OBU_ISSUE_DATE { get; set; }
        public int STATUS { get; set; }
        public string CURRENT_HANDLER { get; set; }

        [Display(Name = "是否维修")]
        public int CONFIRM_REPAIRED { get; set; }
        public int DISPOSE_TYPE { get; set; }
        public Nullable<System.DateTime> FINISHED_DATE { get; set; }
        public Nullable<System.DateTime> GET_BACK_DATE { get; set; }
        public Nullable<bool> IS_RETURNED_SPARE_OBU { get; set; }
        public string RETURNED_COMMENT { get; set; }
        public string CREATED_BY { get; set; }
        public System.DateTime CREATED_DATE { get; set; }
        public string MODIFY_BY { get; set; }
        public System.DateTime MODIFY_DATE { get; set; }

        [Required(ErrorMessage = "请输入发行时间")]
        [RegularExpression(@"^\d{4}[-/.]\d{1,2}[-/.]\d{1,2}$|^\d{4}[-/.]\d{1,2}[-/.]\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}$", ErrorMessage = "*请输入正确格式的发行日期,年月日用'-'分割。如：2013-3-12")]
        [Display(Name = "发行日期")]
        public System.DateTime REGISTER_DATE { get; set; }


        [Required(ErrorMessage = "请输入录入时间")]
        [RegularExpression(@"^\d{4}[-/.]\d{1,2}[-/.]\d{1,2}$|^\d{4}[-/.]\d{1,2}[-/.]\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}$", ErrorMessage = "*请输入正确格式的受理日期,年月日用'-'分割。如：2013-3-12")]
        [Display(Name = "受理日期")]
        public System.DateTime? REPORT_DATE { get; set; }
        public string SUPPLIER { get; set; }
        public string SPEC_NAME { get; set; }
        public string VEHICLE_PLATE_NO { get; set; }
        public int? VEHICLE_CLASS { get; set; }
        public int? SUPPLIER_ID { get; set; }
        public int? SPEC_ID { get; set; }
        public int? ORDER_TYPE { get; set; }

        public virtual ICollection<REPAIR_ORDER_ADJUST> REPAIR_ORDER_ADJUST { get; set; }
        public virtual ICollection<REPAIR_ORDER_FAULT> REPAIR_ORDER_FAULT { get; set; }
    }
}
